Skip to content

Conversation

@patrickdillon
Copy link
Contributor

DiskCategory validation had string type instead of enum.

On master without this change:

$ go generate ./pkg/types/installconfig.go
github.com/openshift/installer/pkg/types:-: conflicting types in allOf branches in schema: string vs DiskCategory
github.com/openshift/installer/pkg/types:-: conflicting types in allOf branches in schema: string vs DiskCategory
github.com/openshift/installer/pkg/types:-: conflicting types in allOf branches in schema: string vs DiskCategory
Error: not all generators ran successfully
run `controller-gen crd:crdVersions=v1 paths=. output:dir=../../data/data/ -w` to see all available markers, or `controller-gen crd:crdVersions=v1 paths=. output:dir=../../data/data/ -h` for usage
exit status 1
pkg/types/installconfig.go:67: running "go": exit status 1

@openshift-ci openshift-ci bot requested review from jstuever and rna-afk November 22, 2021 19:37
@kwoodson
Copy link

@patrickdillon Thanks for this. I haven't seen this. Am I missing a step when I build my clusters?

@patrickdillon
Copy link
Contributor Author

@patrickdillon Thanks for this. I haven't seen this. Am I missing a step when I build my clusters?

@kwoodson no this is only an error when generating new code for openshift-install explain

DiskCategory validation had string type instead of enum.
@patrickdillon
Copy link
Contributor Author

We should figure out how this managed to get through CI

@clnperez
Copy link
Contributor

clnperez commented Dec 1, 2021

i think just

diff --git a/hack/verify-codegen.sh b/hack/verify-codegen.sh
index 58336a517..6db1faf2f 100755
--- a/hack/verify-codegen.sh
+++ b/hack/verify-codegen.sh
@@ -3,7 +3,13 @@
 if [ "$IS_CONTAINER" != "" ]; then
   set -x
   go generate ./pkg/types/installconfig.go
+  if [[ $? != 0 ]]; then
+      exit 1
+  fi
   go generate ./pkg/rhcos/ami.go
+  if [[ $? != 0 ]]; then
+      exit 1
+  fi
   set +x
   git diff --exit-code
 else

would fix up the CI loophole. am happy to submit a PR if no one is already on it

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 2, 2021

@patrickdillon: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-ovirt bc10512 link false /test e2e-ovirt
ci/prow/e2e-openstack bc10512 link false /test e2e-openstack
ci/prow/e2e-crc bc10512 link false /test e2e-crc
ci/prow/e2e-aws-workers-rhel7 bc10512 link false /test e2e-aws-workers-rhel7

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@patrickdillon
Copy link
Contributor Author

would fix up the CI loophole. am happy to submit a PR if no one is already on it

That would be great. Thank you

@clnperez
Copy link
Contributor

clnperez commented Dec 2, 2021

submitted that pr, so as soon as this one merges we can merge it

@staebler
Copy link
Contributor

staebler commented Dec 3, 2021

i think just

diff --git a/hack/verify-codegen.sh b/hack/verify-codegen.sh
index 58336a517..6db1faf2f 100755
--- a/hack/verify-codegen.sh
+++ b/hack/verify-codegen.sh
@@ -3,7 +3,13 @@
 if [ "$IS_CONTAINER" != "" ]; then
   set -x
   go generate ./pkg/types/installconfig.go
+  if [[ $? != 0 ]]; then
+      exit 1
+  fi
   go generate ./pkg/rhcos/ami.go
+  if [[ $? != 0 ]]; then
+      exit 1
+  fi
   set +x
   git diff --exit-code
 else

would fix up the CI loophole. am happy to submit a PR if no one is already on it

Or just remove the set -x and set +x. But this would also require fixing the fact that the ./pkg/rhcos/ami.go no longer exists. See https://issues.redhat.com/browse/CORS-1838.

Copy link
Contributor

@staebler staebler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 3, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 3, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: staebler

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 3, 2021
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 7a6f322 into openshift:master Dec 3, 2021
clnperez added a commit to clnperez/installer that referenced this pull request Dec 8, 2021
if the go codegen commands failed, the the hack/verify-codegen.sh script
continued and the CI check passed. see openshift#5406 for an example. the script
was not set to fail on a non-zero return code. this pr adds the bash e
option to the set builtin to catch errors and exit on failure.

Signed-off-by: Christy Norman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants